<?php

/**
 * EncEvaluacion form base class.
 *
 * @method EncEvaluacion getObject() Returns the current form's model object
 *
 * @package    encuestas
 * @subpackage form
 * @author     qualem
 */
abstract class BaseEncEvaluacionForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'            => new sfWidgetFormInputHidden(),
      'aciertos'      => new sfWidgetFormInputText(),
      'fallos'        => new sfWidgetFormInputText(),
      'calificacion'  => new sfWidgetFormInputText(),
      'tipo'          => new sfWidgetFormInputText(),
      'observaciones' => new sfWidgetFormTextarea(),
      'created_at'    => new sfWidgetFormDateTime(),
      'updated_at'    => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'            => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)),
      'aciertos'      => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'fallos'        => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'calificacion'  => new sfValidatorNumber(),
      'tipo'          => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'observaciones' => new sfValidatorString(),
      'created_at'    => new sfValidatorDateTime(array('required' => false)),
      'updated_at'    => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('enc_evaluacion[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'EncEvaluacion';
  }


}
